﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Last : MonoBehaviour
{
    private float distance;
    private void OnCollisionEnter2D(Collision2D coll)
    {
        distance = Vector2.Distance(coll.transform.position, this.transform.position);
        if (distance <= 5)
        {
            SceneManager.LoadScene("Partener");
        }
    }
}
